<script type="text/javascript">
//菜单配置json
var  _MENU_LIST_ = {
    "list" : {
        "diandi" : {
            "title" : "点滴管理",
            "icon" : "ion-home",
            "list" : [
                {
                    "title" : "话题",
                    "url" : "/admin.php?ac=diarytopic_class&op=getDiaryTopics&type=1",
                }/*,
                {
                    "title" : "话题分类",
                    "url" : "/admin.php?ac=diary2&op=topicsCategory",
                }*/,
                {
                    "title" : "新鲜",
                    "url" : "/admin.php?ac=diary_class&op=getSquareList",
                },
                {
                    "title" : "为你推荐",
                    "url" : "/admin.php?ac=diary2",
                },
                {
                    "title" : "审核视频",
                    "url" : "/admin.php?ac=diary2&op=reviewindex",
                },
                {
                    "title" : "订阅号排序",
                    "url" : "/admin.php?ac=subscriptionSort",
                },
                {
                    "title" : "订阅号点滴",
                    "url" : "/admin.php?ac=subscription",
                },
                {
                    "title" : "订阅号点滴待上线",
                    "url" : "/admin.php?ac=subscription&op=subready",
                },
                {
                    "title" : "订阅号点滴已上线",
                    "url" : "/admin.php?ac=subscription&op=online",
                },
                {
                    "title" : "点滴热门待上线",
                    "url" : "/admin.php?ac=diary_class&op=hotReady",
                },
                {
                    "title" : "点滴热门已上线",
                    "url" : "/admin.php?ac=diary_class&op=hotDiary",
                },
                {
                    "title" : "话题参数修正",
                    "url" : "/admin.php?ac=diarytopic_class&op=correctParam",
                },
                {
                    "title" : "话题评论分析",
                    "url" : "/admin.php?ac=diarytopic_class&op=analysisTCUsers",
                },
                {
                    "title" : "话题自动回复监控",
                    "url" : "/admin.php?ac=diarytopic_class&op=autoreply",
                },
            ]
        },
        "userAdmin" : {
            "title" : "用户管理",
            "icon" : "ion-android-social-user",
            "list" : [
                {
                    "title" : "用户点滴列表",
                    "url" : "/admin.php?ac=diary_class&op=getUserDiaryList",
                },
                {
                    "title" : "女生认证",
                    "url" : "/admin.php?ac=femaleAuth_class&op=getFemaleAuthList",
                },
                {
                    "title" : "订阅号审核",
                    "url" : "/admin.php?ac=admin&do=masterAuth&action=getVerifiedCheckList&index=verifiedCheckList",
                },
                {
                    "title" : "达人认证",
                    "url" : "/admin.php?ac=admin&do=masterAuth",
                },
                {
                    "title" : "管理员",
                    "url" : "/admin.php?ac=admin&do=adminUsers",
                },
                {
                    "title" : "账号操作",
                    "url" : "/admin.php?ac=admin&do=accountOperation",
                },
                {
                    "title" : "多账号操作",
                    "url" : "/admin.php?ac=admin&do=accountsOperation",
                },
                {
                    "title" : "举报投诉(旧)",
                    "url" : "/admin.php?ac=member2&op=reportpage",
                },
                {
                    "title" : "举报投诉(新)",
                    "url" : "/admin.php?ac=member&op=reportlist",
                },
				{
                    "title" : "推荐活跃用户",
                    "url" : "/admin.php?ac=recommentlist",
                },
                {
                    "title" : "客户端日志",
                    "url" : "/admin.php?ac=recommentlist&op=clientlog",
                },
                {
                    "title" : "会员管理",
                    "url" : "/admin.php?ac=vip",
                },
                {
                    "title" : "角色管理",
                    "url" : "/admin.php?ac=role",
                },
                {
                    "title" : "设备管理",
                    "url" : "/admin.php?ac=vip&op=device",
                },
                {
                    "title" : "增加靓号",
                    "url" : "/admin.php?ac=admin&do=goodAccount",
                },
                {
                    "title" : "兑换码管理",
                    "url" : "/admin.php?ac=code",
                },
                {
                    "title" : "群组升级管理",
                    "url" : "/admin.php?ac=group_class&op=groupList",
                },
            ]
        },
        /*"darentang" : {
            "title" : "达人堂",
            "icon" : "fa fa-bank",
            "list" : [
                {
                    "title" : "达人堂",
                    "url" : "/admin.php?ac=admin&do=darentang",
                }
            ]
        },*/
        "article" : {
            "title" : "文章管理",
            "icon" : "ion-ios7-albums-outline",
            "list" : [
                {
                    "title" : "文章列表",
                    "url" : "/admin.php?ac=article_class&op=getArticleList",
                }
            ]
        },
        "robot" : {
            "title" : "机器人",
            "icon" : "ion-android-hand",
            "list" : [
                {
                    "title" : "消息管理",
                    "url" : "/admin.php?ac=robot",
                }
            ]
        },
        "chatroom" : {
            "title" : "快聊站",
            "icon" : "fa fa-wechat",
            "list" : [
                {
                    "title" : "消息管理",
                    "url" : "/admin.php?ac=chatroom",
                }
            ]
        },
		"attachment" : {
            "title" : "图片管理",
            "icon" : "fa fa-image",
            "list" : [
                {
                    "title" : "话题图片",
                    "url" : "/admin.php?ac=attachment&op=getTopicAttachments",
                },
                {
                    "title" : "点滴图片",
                    "url" : "/admin.php?ac=attachment&op=getDiaryAttachments",
                },
                {
                    "title" : "人工审核列表",
                    "url" : "/admin.php?ac=attachment&op=getManualImage",
                }
            ]
        },
		"sendAnnounce_class" : {
            "title" : "通知",
            "icon" : "ion-speakerphone",
            "list" : [
                {
                    "title" : "全站私信",
                    "url" : "/admin.php?ac=sendAnnounce_class&op=getAnnounceList",
                },
                {
                    "title" : "活动推送",
                    "url" : "/admin.php?ac=push_class&op=queryBindList",
                }
            ]
        },
        "shopmanagement" : {
            "title" : "商店管理",
            "icon" : "fa fa-shopping-cart",
            "list" : [
                {
                    "title" : "会员卡片",
                    "url" : "/admin.php?ac=shop_class&op=getCardList",
                },
                {
                    "title" : "信纸商店",
                    "url" : "/admin.php?ac=shop_class&op=getPaperList",
                },
                {
                    "title" : "信纸商店专业版",
                    "url" : "/admin.php?ac=shop_class&op=getPaperList&type=vip",
                },
                {
                    "title" : "表情商店",
                    "url" : "/admin.php?ac=shop_class&op=getEmotionList",
                },
                {
                    "title" : "表情商店专业版",
                    "url" : "/admin.php?ac=shop_class&op=getEmotionList&type=vip",
                },
                {
                    "title" : "字体商店",
                    "url" : "/admin.php?ac=shop_class&op=getFontList",        		
    			},
    			{
    				"title" : "皮肤商店",
    				"url"	: "/admin.php?ac=shop_class&op=getSkinList"
    			},
                {
                    "title" : "书桌店商店",
                    "url"	: "/admin.php?ac=shop_class&op=getDeskList"
                },
    			{
    				"title" : "包管理",
    				"url"	: "/admin.php?ac=shop_class&op=getShopzipList"
    			},
                {
                    "title" : "商店banner",
                    "url"	: "/admin.php?ac=activity2&op=indexShop"
                }
        ]
	},
    "shopmanagementTest" : {
            "title" : "测试商店管理",
            "icon" : "fa fa-shopping-cart",
            "list" : [
                {
                    "title" : "会员卡片",
                    "url" : "/admin.php?ac=shopTest_class&op=getCardList",
                },
                {
                    "title" : "信纸商店",
                    "url" : "/admin.php?ac=shopTest_class&op=getPaperList",
                },
                {
                    "title" : "信纸商店专业版",
                    "url" : "/admin.php?ac=shopTest_class&op=getPaperList&type=vip",
                },
                {
                    "title" : "表情商店",
                    "url" : "/admin.php?ac=shopTest_class&op=getEmotionList",
                },
                {
                    "title" : "表情商店专业版",
                    "url" : "/admin.php?ac=shopTest_class&op=getEmotionList&type=vip",
                },
                {
                    "title" : "字体商店",
                    "url" : "/admin.php?ac=shopTest_class&op=getFontList",              
                },
                {
                    "title" : "皮肤商店",
                    "url"   : "/admin.php?ac=shopTest_class&op=getSkinList"
                },
                {
                    "title" : "书桌店商店",
                    "url"   : "/admin.php?ac=shopTest_class&op=getDeskList"
                },
                {
                    "title" : "包管理",
                    "url"   : "/admin.php?ac=shopTest_class&op=getShopzipList"
                },
                {
                    "title" : "商店banner",
                    "url"   : "/admin.php?ac=activitytest2&op=indexShop"
                }
        ]
    },
	"group_class" : {
        "title" : "圈子管理",
        "icon" : "fa fa-group",
        "list" : [
            {
                "title" : "圈子分类",
                "url" : "/admin.php?ac=group_class&op=getGroupCategories",
            },
            {
                "title" : "所有圈子",
                "url" : "/admin.php?ac=group_class&op=getAllGroup",
            },
            {
                "title" : "每日话题统计",
                "url" : "/admin.php?ac=admin&do=allGroupTopic",
            },
            {
                "title" : "话题计数加权",
                "url" : "/admin.php?ac=count_class&op=getCountWeightList",
            }
        ]
    },
    "planner_category_class" : {
        "title" : "手账管理",
        "icon" : "ion-help-buoy",
        "list" : [
            {
                "title" : "手账分类",
                "url" : "/admin.php?ac=planner_category_class"
            },
            {
                "title" : "手账标签",
                "url" : "/admin.php?ac=planner_class&op=getPlannerTagsList"
            },
            {
                "title" : "手账背景",
                "url" : "/admin.php?ac=planner_class&op=getPlannerPapersList"
            },
            {
                "title" : "手账贴纸",
                "url" : "/admin.php?ac=planner_class&op=getPlannerStickersList"
            },
            {
                "title" : "手账花边笔",
                "url" : "/admin.php?ac=planner_class&op=getPlannerBrushsList"
            },
            {
                "title" : "手账边框",
                "url" : "/admin.php?ac=planner_class&op=getPlannerFramesList"
            },
            {
                "title" : "手账插件",
                "url" : "/admin.php?ac=planner_class&op=getPlannerPluginsList"
            },
            {
                "title" : "手账模板",
                "url" : "/admin.php?ac=planner_class&op=getPlannerTempletsList"
            },

        ]
    },
     //"planner_class" : {
      //  "title" : "手账素材",
       // "icon" : "ion-bookmark",
        //"list" : [
         //   {
          //      "title" : "手账素材",
           //     "url" : "/admin.php?ac=admin&do=planner",
            //}
         //]
        //},
        "activity2" : {
            "title" : "活动广告",
            "icon" : "ion-beer",
            "list" : [
                {
                    "title" : "活动广告更新",
                    "url" : "/admin.php?ac=activity2",
                }
            ]
        },
        "anonymous" : {
            "title" : "匿名管理",
            "icon" : "ion-eye-disabled",
            "list" : [
                {
                    "title" : "最新列表",
                    "url" : "/admin.php?ac=anonymous",
                },{
                    "title" : "匿名评论列表",
                    "url" : "/admin.php?ac=commentary&op=recent"
                },{
                    "title" : "闪聊自动上线",
                    "url" : "/admin.php?ac=anonymous&op=autoline"
                },{
                    "title" : "热门待上线",
                    "url" : "/admin.php?ac=anonymous&op=hotready",
                },{
                    "title" : "热门已上线",
                    "url" : "/admin.php?ac=anonymous&op=online",
                },{
                    "title" : "官方匿名",
                    "url" : "/admin.php?ac=anonymous&op=official",
                }
            ]
        },
        "order" : {
            "title" : "订单管理",
            "icon" : "ion-android-keypad",
            "list" : [
                {
                    "title" : "订单管理",
                    "url" : "/admin.php?ac=order",
                },
                {
                    "title" : "订单管理测试",
                    "url" : "/admin.php?ac=order&op=indexTest",
                },
                {
                    "title" : "提现审核列表",
                    "url" : "/admin.php?ac=withdrawal",
                },
                {
                    "title" : "提现审核列表测试",
                    "url" : "/admin.php?ac=withdrawal&op=indexTest",
                },
                {
                    "title" : "预存金额",
                    "url" : "/admin.php?ac=deposited",
                },
                {
                    "title" : "用户账户管理",
                    "url" : "/admin.php?ac=accounts",
                }
            ]
        },
        "gift" : {
            "title" : "礼物管理",
            "icon" : "ion-android-stair-drawer",
            "list" : [
                {
                    "title" : "礼物",
                    "url" : "/admin.php?ac=giftList",
                }
            ]
        },
        "count" : {
            "title" : "后台管理",
            "icon" : "ion-android-stair-drawer",
            "list" : [
                {
                    "title" : "禁言列表",
                    "url" : "/admin.php?ac=management&op=gagList"
                },
                {
                    "title" : "封禁用户登录信息",
                    "url" : "/admin.php?ac=management&op=forbidLogin"
                }
            ]
        },
        "garbage" : {
            "title" : "反垃圾",
            "icon" : "ion-android-mixer",
            "list" : [
                {
                    "title" : "话题",
                    "url" : "/admin.php?ac=garbage&op=topic"
                },
                {
                    "title" : "话题评论",
                    "url" : "/admin.php?ac=garbage&op=topic_comment"
                },
                {
                    "title" : "日记",
                    "url" : "/admin.php?ac=garbage&op=diary"
                },
                {
                    "title" : "日记评论",
                    "url" : "/admin.php?ac=garbage&op=diary_comment"
                },
            ]
        },
        "statistics" : {
            "title" : "行为统计",
            "icon" : "ion-android-timer",
            "list" : [
                {
                    "title" : "话题",
                    "url" : "/admin.php?ac=statistics&op=topic"
                },
                {
                    "title" : "话题评论",
                    "url" : "/admin.php?ac=statistics&op=diary"
                }
            ]
        },
        "applets_class" : {
         "title" : "小程序管理",
         "icon" : "ion-bookmark",
         "list" : [
                {
                    "title" : "小程序管理",
                    "url" : "/admin.php?ac=admin&do=applets",
                }
         ]
        }
	}
}

//获取查询参数
var GetQueryString = function (url) {
    url ? url : url = window.location.pathname + window.location.search;
   return url;
}

//是否显示active
var renderIsAction = function (ac) {
    var thisAc = GetQueryString();
    if(thisAc == GetQueryString(ac))return 'active';
    return '';
}

//渲染菜单DOM
var renderMenu = function () {
    var tmpObj;
    var html = '';
    var child_html = '';
    var child_active = false;
    for (var i in _MENU_LIST_.list){
        tmpObj = _MENU_LIST_.list[i];
        child_html = '';
        child_active = false;
        for(var j in tmpObj.list){
            if(renderIsAction(tmpObj.list[j].url) == 'active'){
                child_active = true;
            }
            child_html += '<li class="'+renderIsAction(tmpObj.list[j].url)+'"><a href="'+ tmpObj.list[j].url +'"><span class="nav-label">'+ tmpObj.list[j].title +'</span></a></li>';
        }
        html += '<li class="has-submenu '+ (child_active?'active':'') +'"><a href="'+
                'javascript:;' +
                '"><i class="' +
                tmpObj.icon +
                '"></i> <span class="nav-label">'+
                tmpObj.title +
                '</span></a>';
        html += '<ul class="list-unstyled">';
        html += child_html;
        html += '</ul>';

        html += '</li>';
    }
    document.write(html);
}

</script>

<aside class="left-panel">

    <!-- brand -->
    <div class="logo">
        <a href="admin.php" class="logo-expanded">
            <i class="ion-social-buffer"></i>
            <span class="nav-label">粉粉后台管理</span>
        </a>
    </div>
    <!-- / brand -->

    <!-- Navbar Start -->
    <nav class="navigation">
        <ul class="list-unstyled">
            <script type="text/javascript">renderMenu()</script>
        </ul>
    </nav>
        
</aside>